import { del, get, post, put } from '@/utils/request';

// 查询当前区域的车辆
export const getCurrent = async (params: any): Promise<any> => {
	return await get('/api/car', params);
};

// 新增车辆
export const add = async (params: any): Promise<any> => {
	return await post('/api/car', params);
};

// 批量删除
export const deleted = async (params: number[]): Promise<any> => {
	return await del('/api/car/delete', params);
};

//  update
export const update = async (params: any): Promise<any> => {
	return await put('/api/car', params);
};

// 获取车辆的详情信息
export const getCarById = async (carId: any): Promise<any> => {
	return await get(`/api/car/${carId}`);
};
